package com.lyl.label.model.entity;


import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * 标签表(Label)表实体类
 *
 * @author makejava
 * @since 2022-06-19 16:25:42
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("label")
public class Label implements Serializable  {
    private static final long serialVersionUID = 486667414951760061L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标签值
     */
    @TableField("name")
    private String name;

    /**
     * 等级
     */
    @TableField("level")
    private Integer level;

    /**
     * 父标签id
     */
    @TableField("parent_id")
    private Integer parentId;

    /**
     * 是否可以使用
     */
    @TableField("available")
    private Boolean available;

    /**
     * 关键词
     */
    @TableField("keyword")
    private String keyword;

    /**
     * 标签码值
     */
    @TableField("keycode")
    private String keycode;

    /**
     * 创建人id
     */
    @TableField("create_id")
    private Integer createId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;

    /**
     * 删除标记
     */
    @TableLogic
    @TableField("delete_mark")
    private Boolean deleteMark;

    @TableField(exist = false)
    private List<Label> children;

}
